package com.jshx.sz.gdjt.thread.data;

import java.util.ArrayList;
import java.util.HashMap;

public class Data1 implements IDataCon {

	@Override
	public String LocalMapToServerString(HashMap map) {
		String re="";
		
//		]{"order_num", "type", "install_address", "run_num"
//			, "temperature", "humidity", "resualt", "hjr_name", "hjr_id",
		//"resualt1", "remark1", "imgs1", "resualt2", "remark2", "imgs2"
//			, "resualt3", "remark3", "imgs3", "resualt4", "remark4", "imgs4", "resualt5", "remark5", "imgs5", "resualt6", "remark6", "imgs6"
//			, "resualt7", "remark7", "imgs7", "resualt8", "remark8", "imgs8", "resualt9", "remark9", "imgs9", "resualt10", "remark10", "imgs10"
//			, "resualt11", "remark11", "imgs11", "resualt12", "remark12", "imgs12", "resualt13", "remark13", "imgs13", "resualt14", "remark14", "imgs14"
//			, "resualt15", "remark15", "imgs15", "resualt16", "remark16", "imgs16", "resualt17", "remark17", "imgs17"};
 	
		//基本信息
		if(map.containsKey("install_address"))		{re+=",'check_resault1_input_2_1':'"+map.get("install_address")+"'";}
		if(map.containsKey("run_num"))				{re+=",'check_resault1_input_2_2':'"+map.get("run_num")+"'";}
		if(map.containsKey("temperature"))			{re+=",'check_resault1_input_2_3':'"+map.get("temperature")+"'";}
		if(map.containsKey("humidity"))				{re+=",'check_resault1_input_2_4':'"+map.get("humidity")+"'";}
		
		//项目
		for(int i=1;i<18;i++)
		{
			if(map.containsKey("resualt"+i))	//结果	
			{
				re+=",'check_resault1_input_1_"+(4+i)+"':'"+map.get("resualt"+i)+"'";
			} 
			if(map.containsKey("remark"+i))	//备注
			{
				re+=",'check_resault1_input_2_"+(5+i)+"':'"+map.get("remark"+i)+"'";
			} 
			if(map.containsKey("imgs"+i))//图片
			{
				String cdimg=map.get("imgs"+i)+"";
				if(cdimg!=null&&!cdimg.equals("")&&!cdimg.equals("null"))
				{
					re+=",'check_resault1_input_3_"+(40+i)+"':'"+cdimg+"'";
				}
			}
		}
		 
		
		//结论
		if(map.containsKey("resualt"))		{re+=",'check_resault1_input_2_39':'"+map.get("resualt")+"'";}
		if(map.containsKey("hjr_id"))		
		{
			re+=",'check_resault1_input_5_40':'"+map.get("hjr_id")+"'";
			re+=",'workNo2':'"+map.get("hjr_id")+"'";
		}
	 
		return re;
	}

	@Override
	public void proImg(String parentId, String key, ArrayList list) {
		// TODO Auto-generated method stub
		
	}

}
